 |
Power
User FAQ's |
You have reached the
protected page
This is a simple script that checks for that
password and assigns it a Session Variable. If the user exits
the browser, or the session times out, the user is required to
re-enter the password.
The script executes when the page loads. If
the password has not been entered, or if it's incorrect, the
form used to enter the password is loaded. If
everything is okay, then the rest of the page loads.
In HTML View, enter the
following before the <html> tag
in your page. Change the "letmein"
to the new password. Change "password.htm"
to reflect the name of the form page used to enter password.
<%
pagePassword = "letmein"
passwordForm = "asppassword.htm"
IF Session("pwfield") <> pagePassword THEN
IF Request.Form("pwfield") = pagePassword THEN
Session("pwfield")= pagePassword
ELSE
Response.Redirect(passwordForm)
END IF
END IF
%>
These can easily be used on
several pages using a Server Sided Include (SSI).
|